<template>
  <div class="home">
    <!-- loading -->
    <van-overlay :show="showLoading">
      <div class="loading-content">
        <van-loading />
      </div>
    </van-overlay>
    <!-- loading end -->

    <!-- 数据展示 start -->
    <!-- <div>{{ objData }}</div> -->
    <div class="rank-content">
      <div class="rank-list-content">
        <!-- list 循环 -->
        <div class="rank-list">
          <div class="rank-num">1</div>
          <div class="rank-avatar"></div>
          <div class="info-content">
            <div class="nick">111</div>
            <div class="value">11111w</div>
          </div>
        </div>
        <!-- list 循环  end-->
        <!-- list 循环 -->
        <div class="rank-list">
          <div class="rank-num">2</div>
          <div class="rank-avatar"></div>
          <div class="info-content">
            <div class="nick">111</div>
            <div class="value">11111w</div>
          </div>
        </div>
        <!-- list 循环  end-->
        <!-- list 循环 -->
        <div class="rank-list">
          <div class="rank-num">3</div>
          <div class="rank-avatar"></div>
          <div class="info-content">
            <div class="nick">111</div>
            <div class="value">11111w</div>
          </div>
        </div>
        <!-- list 循环  end-->
      </div>
      <div class="date">02:59:59</div>
    </div>
    <!-- 数据展示 end -->
  </div>
</template>

<script>


export default {
  data() {
    return {
      showLoading: false,
      objData: '',
      actId: '',
    }
  },
  created(){
    // 获取链接上面活动id
    // this.showLoading = true
    this.actId = this.$route.query.actId
    console.log(this.actId)
    // 获取数据
    let that = this
    this.$bridge.callHandler(
      'activity_data',
      {
        actId: this.actId,
      },
      data => {
        that.objData = JSON.parse(data).data
        console.log(that.objData)
        // 获取数据成功
        that.showLoading = false
      },
    )

    this.$bridge.registerHandler('activity_data', (data, responseCallback) => {
          console.log('是否获得回调1', data)
          // this.setPhoto(data)
          that.objData = JSON.parse(data).data
    })
  },
  mounted() {

  },
  methods: {}
}
</script>

<style scoped lang="scss">
@import './index.scss';
</style>
